<template>
    <div>
<h1>v3组件</h1>
<h1>{{msg}}</h1>
<h5>{{num}}</h5>
<button @click="add">加4</button>
    </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue'

export default defineComponent({
  data(){
    return{
        msg:'吃饭呢   睡觉',
        num:123479862,
    };
  },
  methods:{
    add(){
        this.msg+=4;
    }
  }
})
</script>

<style scoped>

</style>